package com.xixi.core.rpc.registry;

import com.xixi.core.rpc.model.ServiceMetaInfo;

import java.util.List;

/**
 * @author: zxh
 * @date: 2024/8/25 1:39
 * @description: 注册中心服务本地缓存
 */
public class RegistryServiceCache {

	// 服务缓存
	List<ServiceMetaInfo> serviceCache;

	// 写缓存
	void writeCache(List<ServiceMetaInfo> newServiceCache) {
		this.serviceCache = serviceCache;
	}

	// 读缓存
	List<ServiceMetaInfo> readCache() {
		return serviceCache;
	}

	// 清空缓存
	void clearCache() {
		this.serviceCache = null;
	}
}
